<template>
	<div class="box-office" v-if="mbox.lastDayRank!=''||mbox.firstWeekBox!=''||mbox.sumBox!=''">
		<router-link to="">
			<header>
				<div class="title">票房</div>

				<div class="goto-detail">
					票房详情
					<img src="../assets/img/arrow-right-black.png" alt="" class="img">
				</div>
			</header>

			<div class="data-box">
				<div class="item" v-if="mbox.lastDayRank!=''">
					<div class="value">{{mbox.lastDayRank}}</div>
					<div class="name">昨日排名</div>
				</div>
				<div class="item" v-if="mbox.firstWeekBox!=''">
					<div class="value">{{mbox.firstWeekBox}}</div>
					<div class="name">首周票房(万)</div>
				</div>
				<div class="item" v-if="mbox.sumBox!=''">
					<div class="value">{{mbox.sumBox}}</div>
					<div class="name">累计票房(万)</div>
				</div>
			</div>
		</router-link>
	</div>
</template>

<script>
	export default {
		props: {
			mbox: [Object, Array],
		},
		data() {
			return {

			}
		},
		created() {
			// console.log(this.mbox)
		},
		methods: {

		},
	}
</script>

<style scoped lang="less">
	.box-office {
		margin-top: 12px;
		background-color: #fff;
		overflow: hidden;

		header {
			height: 43px;
			display: flex;
			justify-content: space-between;
			align-items: center;
			padding: 0 15px;

			.title {
				font-size: 15px;
				color: #333;
			}

			.goto-detail {
				font-size: 12px;
				color: #999;

				img {
					width: 5px;
					height: 8px;
					margin-left: 8px;
					background: none;
				}

			}
		}

		.data-box {
			background-color: #f8f8f8;
			border-radius: 6px;
			margin: 0 15px 15px;
			display: flex;
			justify-content: space-between;
			align-items: center;

			.item {
				flex-grow: 1;
				text-align: center;
				padding: 12px 0 11px;

				.value {
					font-size: 17px;
					color: #f03d37;
				}

				.name {
					font-size: 12px;
					color: #666;
					margin-top: 1px;
				}
			}
		}
	}

	a {
		color: inherit;
	}

	.img {
		border: 0;
		display: inline-block;
		background: #f5f5f5 url(../assets/img/下载.png) no-repeat 50%;
		background-size: 50%;
	}
</style>
